<layout name="page" />
<block name="content">
	{:widget('page_header/simple',array('name'=>'编辑产品'))}
	<div class="frame">
		<form method='post' id="form_data" name="form_data" enctype="multipart/form-data"   >
			<input type="hidden" id="ajax" name="ajax" value="0">
			<input type="hidden" id="id" name="id" value="{$vo.id}">
			<input type="hidden" id="opmode" name="opmode" value="edit">
			<div class="frame">
				<div class="box col-12">
					
						<label class="input-label" for="name">产品名称：</label>
						
							<input class="input" type="text" id="name" name="name" value="{$vo.name}"  check="required" info="请输入文件名">
						</div>
					</div>

				</div>
				<div class="box col-12">
					
						<label class="input-label" for="name">产品编码：</label>
						
							<input class="input" type="text" id="doc_no" name="doc_no" value="{$vo.doc_no}"  check="required" info="请输入文件名">
						</div>
					</div>
				</div>
			</div>
			<div class="frame">
				<foreach name="field_list" val="field_vo">
					{:widget('UserDefineField/edit',array($field_vo))}
				</foreach>
			</div>
			<div class="frame">
				<div class="box col-12">
					
						<label class="input-label" for="name">产品描述：</label>
						
							<textarea class="editor" id="content" name="content" style="width:100%;height:200px;" check="required" info="请输入内容">{$vo.content}</textarea>
						</div>
					</div>
				</div>
				<div class="box col-12">
					
						<label class="input-label" for="name">附件：</label>
						
							<div>
								{:widget('file_upload/edit',array('add_file'=>$vo['add_file']))}
							</div>
						</div>
					</div>
				</div>
				<div class="box col-12">
					
						
							<a class="btn btn-normal" onclick="save()">保存</a>
							<a class="btn btn-return" onclick="go_return_url()">取消 </a>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</block>
<block name="js">
	<script type="text/javascript">
		layui.use(['global', 'uploader', 'editor'], function() {
			var $ = layui.jquery;

			$("#btn_save").on('click', function() {
				send_form('form_data', "{:url('save')}", '', function() {

				});
			});
		});
	</script>
</block>